home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / plnk081.zip / pilot-link.0.8.1 / include / pi-expense.h < prev    next >
C/C++ Source or Header  |  1997-08-08  |  2KB  |  90 lines

  1. #ifndef _PILOT_EXPENSE_H_
  2. #define _PILOT_EXPENSE_H_
  3.  
  4. #include "pi-args.h"
  5. #include "pi-appinfo.h"
  6.  
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10.  
  11. #define Expense_Creator makelong("exps")
  12. #define Expense_DB "ExpenseDB"
  13.  
  14. extern char * ExpenseSortNames[];
  15. extern char * ExpenseDistanceNames[];
  16. extern char * ExpensePaymentNames[];
  17. extern char * ExpenseTypeNames[];
  18.                                 
  19. enum ExpenseSort {
  20.     esDate, esType
  21. };
  22.  
  23. enum ExpenseDistance {
  24.     edMiles, edKilometers
  25. };
  26.  
  27. enum ExpensePayment {
  28.     epAmEx, epCash, epCheck, epCreditCard, epMasterCard, epPrepaid, epVISA, epUnfiled
  29. };
  30.  
  31. enum ExpenseType {
  32.     etAirfare, etBreakfast, etBus, etBusinessMeals, etCarRental, etDinner,
  33.     etEntertainment, etFax, etGas, etGifts, etHotel, etIncidentals, etLaundry,
  34.     etLimo, etLodging, etLunch, etMileage, etOther, etParking, etPostage,
  35.     etSnack, etSubway, etSupplies, etTaxi, etTelephone, etTips, etTolls,
  36.     etTrain
  37. };
  38.  
  39. struct ExpenseCustomCurrency {
  40.     char name[16];
  41.     char symbol[4];
  42.     char rate[8];
  43. };
  44.  
  45. struct Expense {
  46.     struct tm date;
  47.     enum ExpenseType type;
  48.     enum ExpensePayment payment;
  49.     int currency;
  50.     char * amount;
  51.     char * vendor;
  52.     char * city;
  53.     char * attendees;
  54.     char * note;
  55. };
  56.  
  57. struct ExpenseAppInfo {
  58.   struct CategoryAppInfo category;
  59.   enum ExpenseSort sortOrder;
  60.   struct ExpenseCustomCurrency currencies[4];
  61. };
  62.  
  63. #define Expense_Pref 1
  64.  
  65. struct ExpensePref {
  66.   int currentCategory;
  67.   int defaultCategory;
  68.   int noteFont;
  69.   int showAllCategories;
  70.   int showCurrency;
  71.   int saveBackup;
  72.   int allowQuickFill;
  73.   enum ExpenseDistance unitOfDistance;
  74.   int currencies[7];
  75. };
  76.  
  77. extern void free_Expense PI_ARGS((struct Expense *));
  78. extern int unpack_Expense PI_ARGS((struct Expense *, unsigned char * record, int len));
  79. extern int pack_Expense PI_ARGS((struct Expense *, unsigned char * record, int len));
  80. extern int unpack_ExpensePref PI_ARGS((struct ExpensePref *, unsigned char * record, int len));
  81. extern int pack_ExpensePref PI_ARGS((struct ExpensePref *, unsigned char * record, int len));
  82. extern int unpack_ExpenseAppInfo PI_ARGS((struct ExpenseAppInfo *, unsigned char * AppInfo, int len));
  83. extern int pack_ExpenseAppInfo PI_ARGS((struct ExpenseAppInfo *, unsigned char * AppInfo, int len));
  84.  
  85. #ifdef __cplusplus
  86. }
  87. #endif
  88.  
  89. #endif /* _PILOT_EXPENSE_H_ */
  90.